﻿using System;
using System.Collections.Generic;
using System.Text;
using SQLite;

namespace FileSystem.Models {
    /// <summary>
    /// 访问控制信息
    /// </summary>
    public class AccessControlInfo {
        /// <summary>
        /// Id
        /// </summary>
        [PrimaryKey]
        [AutoIncrement]
        public int Id { get; set; }

        /// <summary>
        /// 目录项名称
        /// </summary>
        public string DirItemName { get; set; }

        /// <summary>
        /// 位置
        /// </summary>
        public string Location { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 读取权限
        /// </summary>
        public bool Readable { get; set; }

        /// <summary>
        /// 写入权限
        /// </summary>
        public bool Writable { get; set; }

        /// <summary>
        /// 删除权限
        /// </summary>
        public bool Deletable { get; set; }
    }

    public static class AccessControlInfoConst {
        public enum Property {
            DirItemName,
            Location,
            UserName,
            Readable,
            Writable,
            Deletable
        }
    }
}